/*
 * Copyright (c) 2007 Michael Santos <michael.santos@gmail.com>
 *
 */
#define FUSE_USE_VERSION 26

#define TFS_DEBUG	1

char rootdir[MAXPATHLEN];

#define D(x) DV(__FUNCTION__, x)

#define DV(x,y) do { \
	if (TFS_DEBUG) { \
		(void)fprintf(stdout, "%s: %s = %s\n", x, #y, y); \
    }\
} while (0);

#define DD(y) do { \
	if (TFS_DEBUG) { \
		(void)fprintf(stdout, "%s: %s = %u\n", __FUNCTION__, #y,(u_int32_t)y); \
    } \
} while (0);

enum {
	TFS_ENABLE,
	TFS_DISABLE,
};

u_int8_t enforce = TFS_ENABLE;

enum {
    TFS_STATE_OK,
    TFS_STATE_THROTTLED,
    TFS_STATE_NOLIMIT,
};

#if 0
#define TFS_EXPIRED(rate, now)    do { \
    if ( (x->expiry.tv_sec > y.tv_sec) || \
            ( (x->expiry.tv_sec == y.tv_sec) && \
            (x->expiry.tv_usec > y.tv_usec))) \
        return (-1); \
    else \
        return (0); \
} while (0);
#endif /* 0 */

#define TFS_EXPIRED(x,y)  (x->expiry.tv_sec > y.tv_sec) || \
            ( (x->expiry.tv_sec == y.tv_sec) && (x->expiry.tv_usec > y.tv_usec))

/* Environment variables */
#define TFS_ENFORCE_CHECKS  "TFS_ENFORCE_CHECKS"    /* Disable threshold penalties */

